<template>
    <el-dialog
        title="描述信息"
        :visible.sync="showValue"
        append-to-body
        :close-on-click-modal="false"
        width="700px"
        top="30px"
        :close="clearData"
        :before-close="clearData"
    >
        <div class="wrap" v-html="currRow[msName]"></div>
    </el-dialog>
</template>

<script>
export default {
    props: {
        value: Boolean,
        currRow: Object,
        msName: String
    },
    data () {
        return {
            showValue: false
        }
    },
    watch: {
        value (val) {
            console.log(val)
            this.showValue = val
        },
        showValue (val) {
            this.$emit('update:value', val)
        }
    },
    methods: {
        // 清空数据
        clearData () {
            this.showValue = false
        }
    }
}
</script>
<style lang="stylus" rel="stylesheet/stylus" scoped>
.item
    width: 110px

.wrap
    overflow: auto
    min-height: 50px

.right
    text-align: right
</style>